//
//  DatePickerCell.m
//  FlowLayout
//
//  Created by Fuzzie Liu on 15/11/4.
//  Copyright © 2015年 Fuzzie Liu. All rights reserved.
//

#import "DatePickerCell.h"

@implementation DatePickerCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.datePicker = [[UIDatePicker alloc] init];
        self.datePicker.date = [NSDate date];
        self.datePicker.datePickerMode = UIDatePickerModeDateAndTime;
        self.datePicker.locale = [NSLocale systemLocale];
        [self.contentView addSubview:_datePicker];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.datePicker.center = self.contentView.center;
}

@end
